import { ref, computed } from 'vue';
import { defineStore } from 'pinia';

export const useCounterStore = defineStore('counter', () => {
    // 1. css变量换肤
    const theme = ref('');
    function setTheme(newTheme: string) {
        theme.value = newTheme;
        localStorage.setItem('theme', newTheme); // 暂时没有做持久化
    }

    return { theme, setTheme };
});
